﻿<!doctype html>
<html>
<head>
    <title>SpreadJS - Culture</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="spreadjs culture" content="ja-jp" />

    <link href="../../../external/spreadjs/css/gcspread.sheets.excel2013white.9.40.20161.0.css" rel="stylesheet" type="text/css" />

    <script src="../../../external/external/jquery-1.8.2.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="../../../external/spreadjs/gcspread.sheets.all.9.40.20161.0.min.js"></script>

    <script type="text/javascript" src="../../../external/spreadjs/resources/ja/gcspread.sheets.resources.ja.9.40.20161.0.min.js"></script>

    <script type="text/javascript" src="../../../external/spreadjs/resources/zh/gcspread.sheets.resources.zh.9.40.20161.0.min.js"></script>

    <script id="scriptInit" type="text/javascript">
        /*code_begin*/
        var spreadNS = GcSpread.Sheets;
        $(document).ready(function () {
            var spread = new GcSpread.Sheets.Spread(document.getElementById("ss"), { sheetCount: 1 });
            initSpread(spread);

            $("#cultureName").change(function () {
                GcSpread.Sheets.Culture($(this).val());
            });
        });

        function initSpread(spread) {
            spread.isPaintSuspended(true);
            spread.showResizeTip(spreadNS.ShowResizeTip.Both);
            spread.showScrollTip(spreadNS.ShowScrollTip.Both);
            var sheet = spread.getActiveSheet();
            for (var r = 0; r < 10; r++) {
                for (var c = 0; c < 5; c++) {
                    sheet.setValue(r, c, r + c);
                }
            }
            sheet.rowFilter(new spreadNS.HideRowFilter(new spreadNS.Range(0, 0, 10, 5)));
            sheet.setValue(10, 0, "SUM:");
            sheet.setFormula(10, 1, "SUM(A1:E10)");
            sheet.setValue(11, 0, "PIESPARKLINE:");
            sheet.setFormula(11, 1, 'PIESPARKLINE(A1:E10,"yellow", "green")');
            sheet.setRowHeight(11, 100);
            sheet.setColumnWidth(0, 120);
            sheet.setColumnWidth(1, 100);
            spread.isPaintSuspended(false);
                
            GcSpread.Sheets.Culture($("#cultureName").val());
        }
        /*code_end*/
    </script>
</head>
<body>
<div class="sample-turtorial">
    <div id="ss" style="width:100%; height:420px;border: 1px solid gray;"></div>

    <div class="demo-options">
        <br />
        <div class="option-row">
            <label>Culture:</label>
            <select id="cultureName">
                <option value="en-us" selected>English</option>
                <option value="zh-cn">Chinese</option>
                <option value="ja-jp">Japanese</option>
            </select>
        </div>
        <br />
        <div class="option-row">
            <ul>
                <li>Check filter dialog, drag fill popup menu, resize tip, scroll tip...</li>
                <li>Check function popup description(cell B11, B12)</li>
            </ul>
        </div>
    </div>
</div>
</body>
</html>